<!doctype html>
<html xmlns:th="www.thymeleaf.org">
<meta charset="utf-8">
<head th:replace="index::head"></HEAD>
<style>
.layui-breadcrumb *{
	vertical-align: bottom;
}
</style>
<BODY>
	<header th:replace="index::#ph"></header>
	<!--      主体        -->
	<main>
		<!--      导航        -->
		<div style="padding: 3px 8px">
			<span class="layui-breadcrumb">
				<a href="/">作业论坛首页</a>
				<a>
					<cite>
					<img :src="stu.head" style="height: 22px"/>
					{{stu.name}}的作业</cite>
				</a>
			</span>
		</div>
		<!--      新帖        -->
		<DIV class="t">
			<TABLE cellSpacing="0" cellPadding="0" width="100%">
				<!--       表 头           -->
				<TR class="tr2">
					<TD style="width: 22px;text-align: center;">&nbsp;</TD>
					<TD style="width: 35%">作业</TD>
					<TD style="width: 7%">状态</TD>
					<TD style="width: 5%">提交</TD>
					<TD style="width: 5%">回复</TD>
					<TD style="width: 30%">最新回复</TD>
					<TD style="width: 7%">发布时间</TD>
					<TD style="width: 5%">发布者</TD>
				</TR>
				<!--         主 题 列 表        -->
				<TR class="tr3" v-for="o in page.content">
					<TD>
						<a th:if="${session?.loginedUser?.role}==0" :href="'to_task-edit?id='+o.id"><IMG src="image/topic.gif" border=0></a>
						<IMG th:if="${session?.loginedUser?.role}!=0" src="image/topic.gif" border=0>
					</TD>
					<TD style="FONT-SIZE: 15px">
						<A :href="'to_detail?id='+o.id">{{o.clsSn}}班：{{o.course.name}} {{o.name}}</A>
					</TD>
					<TD class="center">
						<span v-if=" ! o.log.progress" class="layui-badge layui-bg-orange">
							<a :href="param()?'javascript:;':('to_tasklog?task.id='+o.id)">未完成</a>
						</span>
						<span v-else-if="o.log.progress==100" class="layui-badge layui-bg-green">
							<a :href="'to_tasklog?id='+o.log.id">已完成</a>
						</span>
						<span v-else class="layui-badge layui-bg-cyan">
							<a :href="'to_tasklog?id='+o.log.id">完成中</a>
						</span>
					</TD>
					<TD class="center"><a :href="replace('to_tasklogs?id=[1]&clsSn=[2]',o.id,o.clsSn)">{{o.log.commit_cnt}}</a></TD>
					<TD class="center"><a :href="replace('to_tasklogs?id=[1]&clsSn=[2]',o.id,o.clsSn)">{{o.log.comment_cnt}}</a></TD>
					<td class="rowcontent">
						<IMG v-if="o.log.content" :src="o.log.head" height="26px">
						<A v-if="o.log.content" :href="'to_detail?id='+o.id">
							<span>{{o.log.name}}：</span><span v-html="charImg(o.log.content,20)"></span>
						</A>
					</td>
					<TD class="center">{{castDateFormat(o.inTime,"MM月dd号")}}</TD>
					<TD class="center">{{nvl(o,'inUser.name')}}</TD>
				</TR>
			</TABLE>
		</DIV>
		<!--            翻 页          -->
		<page :url="'task/task/find?order=id!&clsSn=' + stu.clsSn" data="page" 
			:join="'list/TaskExt?uid=' + stu.id" on="id=task_id==>log"></page>
	</main>
	<script type="text/javascript">
		var v = new Vue({
			el:"main",
			data:{
				stu : {
					name:'[[${user?.name}]]',
					clsSn:'[[${user?.clsSn}]]',
					id:'[[${user?.id}]]',
					head:'[[${user?.head}]]'
				},
				page:{}
			}
		})
		layui.element.render();
	</script>
	<!-- 导入页脚 -->
	<footer th:replace="index::footer"></footer>
</BODY>
</HTML>
